import isObject from "./isObject";
import isArray from "./isArray";
import extend from "./extend";

export default function clone(obj) {
  if (!isObject(obj)) {
    return obj
  }
  return isArray(obj) ? obj.slice() : extend({}, obj)
}

